"""
driver.back()
driver.forward()
driver.refresh()
"""
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Edge()

driver.get('https://www.sogou.com/')
# driver.find_element_by_css_selector('#query').send_keys('易烊千玺')
driver = driver.find_element(By.ID, 'query')  # 定位网页中id为kw的元素，即百度搜索输入框
driver.send_keys('易烊千玺')
driver.find_element_by_id('stb').click()
sleep(2)

# 后退
driver.back()
sleep(2)

# 前进
driver.forward()
sleep(2)

# 刷新
driver.refresh()

sleep(3)

driver.quit()
